package com.zoweunion.mechanic.dao.app;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.time.LocalDate;
import java.util.List;
import java.util.Map;

@Component
public interface PushMessageRecordMapper {

    /**
     * 插入推送消息
     * @param reqMap
     * @return
     */
    int insertMessageRecord(Map<String, Object> reqMap);

    /**
     * 插入推送消息
     * @param list
     * @return
     */
    int insertBatchMessageRecord(List<Map<String, Object>> list);

    /**
     * 更新推送消息
     * @param reqMap
     * @return
     */
    int updateMessageRecord(Map<String, Object> reqMap);

    /**
     * 根据内容类型获取没有推送出去的消息记录
     * @param contentType
     * @return
     */
    List<Map<String, Object>> getNoPushMessageByContentType(@Param("contentType") Integer contentType, @Param("date") LocalDate date);

    /**
     * 批量更新推送状态
     * @param pushStatus
     * @param pushResult
     * @param id
     * @return
     */
    int updatePushStatus(@Param("pushStatus") Integer pushStatus, @Param("pushResult") Integer pushResult, @Param("id") String id);



    int getPushMessageNotificationCount(Map<String, Object> params);

    int savePushMessageNotificationCount(Map<String, Object> params);

    int updatePushMessageNotificationCount(Map<String, Object> params);
}
